using System;
using System.Collections.Generic;
using System.Windows.Controls;
using EndToEndSilverlightDemo;
using EndToEndSilverlightDemo.NorthWindServiceReference;

namespace EndtoEndSilverlightDemo.Tests
{
    public class ProductSearchViewStub : Canvas, IProductSearchView
    {
        public Product[] ProductItems;

        public void SetGridProductItems(IEnumerable<Product> productSearchResults)
        {
            ProductItems = (Product[]) productSearchResults;
        }

        public event EventHandler<EndToEndSilverlightDemo.EventArgs<string>> SearchButtonClicked;

        public void FireSearchButtonClicked(string searchString)
        {
            this.SearchButtonClicked(this, new EventArgs<string>(searchString));
        }
    }
}